using System.Web.Mvc;
using Microsoft.Practices.Unity;
using Unity.Mvc3;

namespace StoreDemo.Web
{
    /// <summary>
    /// Acts as the Dependency Composition Root
    /// </summary>
    public static class RootBootstrapper
    {
        public static void Initialise()
        {
            UnityContainer unityContainer = new UnityContainer();

            Web.Bootstrapper.RegisterDependecies(unityContainer);
            Domain.Bootstrapper.RegisterDependecies(unityContainer);
            Data.Bootstrapper.RegisterDependecies(unityContainer);

            DependencyResolver.SetResolver(new UnityDependencyResolver(unityContainer));
        }
    }
}